var lvlupConfig = {
  heroLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    addAttri: { //每升一级获得的属性
      attack: 1
    },
  },
  alchemyLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    values: [11, 12, 13, 14, 15, 16, 17, 18, 19, 10]
  },
  attackLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    basicValue: 1, //初始值
    addAttri: { //每升一级获得的属性
      attack: 1
    },
  },
  attackSpeedLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    basicValue: 500, //初始值
    addAttri: { //每升一级获得的属性
      attackSpeed: 50
    },
  },
  critRateLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    basicValue: 5, //初始值
    addAttri: { //每升一级获得的属性
      critRate: 0.5
    },
  },
  critHurtLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    basicValue: 50, //初始值
    addAttri: { //每升一级获得的属性
      critHurt: 5
    },
  },
  punctureLvl: {
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    basicValue: 1, //初始值
    addAttri: { //每升一级获得的属性
      puncture: 1
    },
  },
}

var skillConfig = {
  440001: { //技能 贪婪:每次攻击获得的金币
    name: '贪婪',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] //每一级对于的属性
  },
  440002: { //技能 攻击增幅:每次%攻击
    name: '攻击增幅',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] //每一级对于的属性
  },
  440003: { //技能 迅捷:减少%技能cd
    name: '迅捷',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] //每一级对于的属性
  },
  440004: { //技能 专注:提升终极技能的效果事件
    name: '专注',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    basicValue: 0, //初始值
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] //每一级对于的属性
  },
  440005: { //技能 残酷:提升%减甲
    name: '残酷',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每一级提升的数值
  },
  440006: { //技能 攻速增幅: 提升%攻速
    name: '攻速增幅',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每一级提升的数值
  },
  440007: { //技能 麻痹:当boss处于虚弱,击晕,中毒状态时, 提升伤害
    name: '麻痹',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每一级提升的数值
  },
  440011: { //技能 毁灭阴影
    name: '毁灭阴影',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    cd: 1000, //技能cd
    values: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], //每一级提升的数值
  },
  440012: { //技能 支配死灵
    name: '支配死灵',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    maxStackBuff: [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], //buff的上限
    buffId: 450012,
  },
  440013: { //技能 魔王降临
    name: '魔王降临',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每一级提升的数值
  },
  440014: { //技能 魂之挽歌
    name: '魂之挽歌',
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 3, //1主动技能2被动技能3大招
    values: [100, 200, 300, 400, 500, 600, 700, 800, 900, 100], //每一级提升的数值
    buffId: 450014,
  },
  440015: { //技能 冰箭 射出一只冰箭
    name: '冰箭',
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    cd: 2500, //技能cd
    values: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], //每一级提升的数值
  },
  440016: { //技能
    name: '沉默',
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    cd: 2000, //技能cd
    values: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], //每一级提升的数值
  },
  440017: { //技能
    name: '强击光环', //提升攻击力
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    cd: 1000, //技能cd
    values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每一级提升的数值
  },
  440018: { //技能
    name: '射手天赋', //提升攻速
    max: 10, //最高等级
    needGold: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], //每升一级需要的金钱
    skillType: 3, //1主动技能2被动技能3大招
    values: [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], //每一级提升的数值
    buffId: 450018,
  },
  440021: { //boss技能
    name: '虚弱', //减少攻击
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    values: [100, 200, 300, 400], //每一级提升的数值
    buffId: 450021,
  },
  440022: { //boss技能
    name: '霜冻', //减少攻速,
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    values: [200, 300, 400], //减少攻速
    buffId: 450022,
  },
  440023: { //boss技能
    name: '龙之血统', //提升护甲,
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [200, 300, 400, 500], //
  },
  440024: {
    name: '失效力场', //提升魔抗,
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [200, 300, 400, 500], //
  },
  440025: {
    name: '模糊', //闪避,
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [10, 15, 20, 25], //
  },
  440026: {
    name: '不可侵犯', //提升魔抗,
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 2, //1主动技能2被动技能3大招
    values: [10, 15, 20, 25], //
  },
  440027: {
    name: '法术护盾', //提升魔抗,
    max: 10, //最高等级
    needGold: [], //每升一级需要的金钱
    skillType: 1, //1主动技能2被动技能3大招
    values: [10, 15, 20, 25], //.
    buffId: 450027,
  },
}

var buffConfig = {
  450012: { // 支配死灵buff
    name: '支配死灵buff',
    maxStack: 1, //buff的叠加数
    buffTime: 0, //buff持续的时间 0永久 大于0有cd
    value: 5, //buff提升的数值
    skillId: 440012,
  },
  450014: { // 魂之挽歌buff
    name: '魂之挽歌buff',
    maxStack: 1, //buff的叠加数
    buffTime: 30000, //buff持续的时间 0永久 大于0有cd
    values: [100, 150, 200, 250, 300, 350, 400, 450, 500, 600], //每一级提升的数值
    skillId: 440014,
  },
  450018: { // 魂之挽歌buff
    name: '射手天赋buff',
    maxStack: 1, //buff的叠加数
    buffTime: 30000, //buff持续的时间 0永久 大于0有cd
    values: [100, 150, 200, 250, 300, 350, 400, 450, 500, 600], //每一级提升的数值
    skillId: 440018,
  },
  450021: { // 魂之挽歌buff
    name: '虚弱buff',
    maxStack: 1, //buff的叠加数
    buffTime: 30000, //buff持续的时间 0永久 大于0有cd
    skillId: 440021,
  },
  450022: { // 魂之挽歌buff
    name: '霜冻buff',
    maxStack: 1, //buff的叠加数
    buffTime: 30000, //buff持续的时间 0永久 大于0有cd
    skillId: 440022,
  },
  450027: { // 魂之挽歌buff
    name: '法术护盾',
    maxStack: 1, //buff的叠加数
    buffTime: 30000, //buff持续的时间 0永久 大于0有cd
    skillId: 440027,
  },
}

var bossConfig = {
  skills: [440021, 440022, 440023, 440024, 440025, 440026, 440027]
  1: {
    hp: 10,
    maxHp: 10,
    lvl: 1,
    defend: 0, //攻击力
    skillHurt: 0, //技能伤害率
    dodge: 0, //闪避

  },
  2: {
    hp: 100000,
    lvl: 2,
    maxHp: 100000,
    defend: 1000, //攻击力
    skillHurt: 0, //技能伤害率
    dodge: 0, //闪避
  },
  3: {
    hp: 1000000,
    lvl: 3,
    maxHp: 1000000,
    defend: 1000, //攻击力
    skillHurt: 0, //技能伤害率
    dodge: 0, //闪避
  },
  4: {
    hp: 10000000,
    lvl: 4,
    maxHp: 10000000,
    defend: 1000, //攻击力
    skillHurt: 0, //技能伤害率
    dodge: 0, //闪避
  },
  5: {
    hp: 10000000,
    lvl: 5,
    maxHp: 10000000,
    defend: 1000, //攻击力
    skillHurt: 0, //技能伤害率
    dodge: 0, //闪避
  },
}
var heroConfig = {
  100001: {
    name: '奈文魔尔',
    thunderSkillId: 440014,
    skills: [440011, 440012, 440013]
  },
  100002: {
    name: '黑暗游侠',
    thunderSkillId: 440018,
    skills: [440015, 440016, 440017]
  },
}
var propName = {}
var templateConfig = {}
templateConfig.buffConfig = buffConfig
templateConfig.skillConfig = skillConfig

for (var i in templateConfig) {
  for (var j in templateConfig[i]) {
    if (templateConfig[i][j].name)
      propName[j] = templateConfig[i][j].name
  }
}
